<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/util_file/common.jspf"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
#admin_product {
	font: 12px/1.2 "돋움", dotum, bold;
}

th {
	background-color: #f1f1f1
}
</style>
<!-- <script type="text/javascript" src="/jeons/js/jquery.nyroModal.custom.js"></script>  
<link rel="stylesheet" href="/jeons/css/nyroModal/nyroModal.css" type="text/css" media="screen"/>-->
<link rel="stylesheet" href="/jeons/css/nyroModal/nyroModal.css" type="text/css" media="screen" />
<script type="text/javascript" src="/jeons/js/jquery.nyroModal.custom.js"></script>
<script src="/jeons/js/jquery.metadata.js" type="text/javascript"></script>
<script src="/jeons/js/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript" src="/jeons/js/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="/jeons/js/datepicker.util.js"></script>
<script type="text/javascript" src="/jeons/js/jquery.meio.mask.min.js"></script>
<script type="text/javascript">
	$(document).ready( function(){
		//팝업
		$(".nm").nm({
			sizes:{
				minW : 400,
				maxW : 500,
				minH : 800,
				maxH : 400
			}
		});
		
		//전체 체크 전체해제
		$('#allChk').click( function(){
			if($(this).is(":checked")){
				$("[name=chk]").attr("checked", "checked");
			}else{
				$("[name=chk]").removeAttr("checked");
			}
		});
		
		//주문하기
		$("#Btnpay").click(function(){
			var obj = $("#frm").serialize();
			$.post('/jeons/basket/user_pay',obj, function(data){
				$("#subpage").replaceWith(data);
				$("button#Btnpay").attr("disabled", "disabled");
				$("[name=chk]").attr("disabled", "disabled");
			});
			
			
		});
		
		
	
		
	});
</script>
</script>
<br>
<br>
<div id="admin_product">
	<fieldset class="autotab ui-widget ui-widget-content ui-corner-all">
		<form id="frm">
			<input type="hidden" name="u_id" value="${sessionScope.u_id}" />

			<table border="0" width="650px" height="50">
				<tr>
					<td colspan="7" bgcolor="#000000" height="1"></td>
				</tr>
				<tr>
					<th align="center"><input type="checkbox" id="allChk"></th>
					<th align="center">상품명</th>
					<th align="center">결제가격</th>
					<th align="center">수 량</th>
					<th align="center">배송타입</th>
					<th align="center">적립금</th>
				</tr>
				<tr>
					<td colspan="7" bgcolor="#ffffff" height="1"></td>
				</tr>
				<tr>
					<td colspan="7" bgcolor="#ffffff" height="1"></td>
				</tr>
				<c:forEach items="${data}" var="item" varStatus="status">
					<tr basketno="${item.basketno}">
						<td align="center"><input type="checkbox" name="chk"
							value="${item.basketno}" /></td>
						<td align="center"><a
							href="/jeons/basket/info_bd?basketno=${item.basketno}" class="nm">${item.goods_name}   </a></td>
						<td align="center">${item.goods_price}</td>
						<td align="center">${item.went}</td>
						<td align="center">
							<c:if test="${item.delivery == null && item.del_status == 'sun'}">
						    무료배송
							</c:if> 
							<c:if test="${item.del_status == 'sun' && item.delivery != null}">
						    선불
							</c:if> 
							<c:if test="${item.del_status == 'chak'&& item.delivery != null }">
							착불
							</c:if>
						</td>
						<td align="center">${item.point}</td>
					</tr>
					<tr>
						<td colspan="7" bgcolor="#ffffff" height="1"></td>
					</tr>
				</c:forEach>
				<tr>
					<td colspan="7" bgcolor="#ffffff" height="1"></td>
				</tr>
				<tr align="right">
					<td colspan="7"><button type="button" id="Btnpay">주문하기</button></td>
				</tr>
			</table>
		</form>
		<div id="subpage"></div>
		<fieldset class="autotab ui-widget ui-widget-content ui-corner-all">
</div>